home *** CD-ROM | disk | FTP | other *** search
- /*
- File: BentoSuppress.cpp
-
- Contains: classes to temporarily suppress or delay fatal Bento errors.
-
- Owned by: Douglas Hill
-
- Copyright: © 1996 by Apple Computer, Inc., all rights reserved.
-
- Change History (most recent first):
-
- <3> 8/19/96 DH 1376276:OD corrupts document when out of
- disk creating draft. Introduced TempCMValue
- class to properly set and reset usecount of
- values.
- <2> 8/13/96 DM 1376080: new class TempDelayBentoFatalError
- prevents fatal errors from being
- permanently disabled
- */
-
- #ifndef _BENTOSUPPRESS_
- #include "BentoSuppress.h"
- #endif
-
- //------------------------------------------------------------------------------
- // TempSuppressFatalBentoError
- //------------------------------------------------------------------------------
-
- TempSuppressFatalBentoError::TempSuppressFatalBentoError()
- {
- fOldSuppress = gODSuppressBentoFatalError;
- gODSuppressBentoFatalError = kODTrue;
- }
-
- TempSuppressFatalBentoError::~TempSuppressFatalBentoError()
- {
- gODSuppressBentoFatalError = fOldSuppress;
- }
-
-
- //------------------------------------------------------------------------------
- // TempDelayBentoFatalError
- //------------------------------------------------------------------------------
-
- TempDelayBentoFatalError::TempDelayBentoFatalError()
- {
- fOldDelay = gODDelayBentoFatalError;
- gODDelayBentoFatalError = kODTrue;
- }
-
- TempDelayBentoFatalError::~TempDelayBentoFatalError()
- {
- gODDelayBentoFatalError = fOldDelay;
- }
-
-
- //------------------------------------------------------------------------------
- // TempCMValue
- //------------------------------------------------------------------------------
-
- TempCMValue::TempCMValue()
- : fValue( kODNULL )
- {
- }
-
- TempCMValue::~TempCMValue()
- {
- if ( fValue )
- {
- CMValue v = fValue;
- fValue = kODNULL;
- CMReleaseValue(v);
- }
- }
-
-